using System;
using System.Runtime.Serialization;
using Oracle.ManagedDataAccess.Client;

namespace Oracle.ManagedDataAccess.Types
{
	[Serializable]
	public sealed class OracleTruncateException : OracleTypeException
	{
		internal static readonly string DefMesg;

		static OracleTruncateException()
		{
			DefMesg = GetDefMesg();
		}

		public OracleTruncateException()
		{
			m_number = ResourceStringConstants.TYP_ERR_TRUNCATE;
			m_mesg = DefMesg;
		}

		public OracleTruncateException(string message)
			: base(message)
		{
			m_number = 0;
			m_mesg = message;
		}

		protected OracleTruncateException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}

		internal static string GetDefMesg()
		{
			return OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.TYP_ERR_TRUNCATE);
		}
	}
}
